typedef struct xps_document_s xps_document;
typedef struct xps_page_s xps_page;
typedef struct xml_element xml_element;

xml_element*   xml_parse_document(            fz_context *doc, unsigned char *buf, int len);
xml_element*   xml_next(                      xml_element *item);
xml_element*   xml_down(                      xml_element *item);
char*          xml_tag(                       xml_element *item);
char*          xml_att(                       xml_element *item, const char *att);
void           xml_free_element(              fz_context *doc, xml_element *item);
void           xml_print_element(             xml_element *item, int level);
void           xml_detach(                    xml_element *node);
xps_document*  xps_open_document(             fz_context *ctx, char *filename);
xps_document*  xps_open_document_with_stream( fz_stream *file);
void           xps_close_document(            xps_document *doc);
int            xps_count_pages(               xps_document *doc);
xps_page*      xps_load_page(                 xps_document *doc, int number);
fz_rect        xps_bound_page(                xps_document *doc, xps_page *page);
void           xps_run_page(                  xps_document *doc, xps_page *page, fz_device *dev, fz_matrix ctm, fz_cookie *cookie);
fz_link*       xps_load_links(                xps_document *doc, xps_page *page);
void           xps_free_page(                 xps_document *doc, xps_page *page);
fz_outline*    xps_load_outline(              xps_document *doc);
